package com.jintoufs.dao.baseinfo.impl;

import com.jintoufs.dao.MyBatisSupport;
import com.jintoufs.dao.QueryFilters;
import com.jintoufs.dao.baseinfo.CustomerDAO;
import com.jintoufs.domain.baseinfo.Customer;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2016/9/1 0001.
 */
@Repository
public class CustomerDAOImpl extends MyBatisSupport<CustomerDAO, Customer> implements CustomerDAO {

    @Override
    public List<Customer> queryByParams(Map<String, Object> params) {
        return getMapper().queryByParams(params);
    }

    @Override
    public void insert(Customer customer) {
        getMapper().insert(customer);
    }

    @Override
    public void update(Customer customer) {
        getMapper().update(customer);
    }

    @Override
    public void delete(Long id) {
        getMapper().delete(id);
    }

    @Override
    public List<Customer> getByFilter(QueryFilters filters) {
        return getMapper().getByFilter(filters);
    }

    @Override
    public Customer queryByPrimaryKey(Long id) {
        return getMapper().queryByPrimaryKey(id);
    }
}
